<?php

namespace common\models\feedback;

use Yii;

/**
 * This is the model class for table "{{%feedback}}".
 *
 * @property int $id
 * @property int $user_id 反馈人用户ID
 * @property int $scene_id 应用场景ID
 * @property string $content 反馈内容
 * @property string $mobile 手机号
 * @property int $device_id 备注
 * @property int $ip 备注
 * @property int $accept_status 受理状态
 * @property int $status 状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class Feedback extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%feedback}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['user_id', 'scene_id', 'device_id', 'ip', 'accept_status', 'status', 'created_at', 'updated_at'], 'integer'],
            [['content'], 'required'],
            [['content'], 'string', 'max' => 255],
            [['mobile'], 'string', 'max' => 11],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'user_id' => '反馈人用户ID',
            'scene_id' => '应用场景ID',
            'content' => '反馈内容',
            'mobile' => '手机号',
            'device_id' => '备注',
            'ip' => '备注',
            'accept_status' => '受理状态',
            'status' => '状态',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
